package com.neuronbit.businessflow.intellij.model;

import com.neuronbit.businessflow.intellij.model.annotation.HiddenProperty;
import org.checkerframework.checker.nullness.qual.NonNull;

import java.io.Serializable;

/**
 * The type Auto task.
 */
public class StatefulTask extends JavaMethodTask implements Serializable {
    private Call stateChecker = new Call();

    /**
     * Instantiates a new Auto task.
     */
    public StatefulTask() {
        this(null, "StatefulTask");
    }

    /**
     * Instantiates a new Auto task.
     *
     * @param id   the id
     * @param name the name
     */
    public StatefulTask(String id, String name) {
        super(id, name, NodeType.STATEFUL_TASK);
    }

    public @NonNull Call getStateChecker() {
        return stateChecker;
    }

    @HiddenProperty
    public void setStateChecker(Call stateChecker) {
        this.stateChecker = stateChecker;
    }
}
